home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir27 / calctool.zip / EXTERN.H < prev    next >
C/C++ Source or Header  |  1992-09-09  |  6KB  |  104 lines

  1.  
  2. /*  @(#)extern.h 1.9 89/11/01
  3.  *
  4.  *  Contains the external variable definitions used by calctool.
  5.  *
  6.  *  Copyright (c) Rich Burridge.
  7.  *                Sun Microsystems, Australia - All rights reserved.
  8.  *
  9.  *  Permission is given to distribute these sources, as long as the
  10.  *  copyright messages are not removed, and no monies are exchanged.
  11.  *
  12.  *  No responsibility is taken for any errors or inaccuracies inherent
  13.  *  either to the comments or the code of this program, but if
  14.  *  reported to me then an attempt will be made to fix them.
  15.  */
  16.  
  17. extern char *make_fixed(), *make_number(), *make_scientific() ;
  18. extern char base_str[4][4] ;               /* Strings for each base value. */
  19. extern char con_names[MAXREGS][MAXLINE] ;  /* .calctoolrc constant names. */
  20. extern char cur_op ;            /* Current arithmetic operation. */
  21. extern char current ;           /* Current button or character pressed. */
  22. extern char digits[] ;          /* Valid numerical digits. */
  23. extern char display[] ;         /* Current calculator display. */
  24. extern char dtype_str[2][4] ;   /* Strings for each display mode value. */
  25. extern char *exp_posn ;         /* Position of the exponent sign. */
  26. extern char fnum[] ;            /* Scratch area for fixed point numbers. */
  27. extern char fun_names[MAXREGS][MAXLINE] ; /* .calctoolrc function names. */
  28. extern char fun_vals[MAXREGS][MAXLINE] ;  /* .calctoolrc function defs. */
  29. extern char geometry[] ;        /* X11 geometry information. */
  30. extern char helpname[] ;        /* Filename for helpfile. */
  31. extern char num_names[MAXREGS][2] ;       /* Used by the popup menus. */
  32. extern char old_cal_value ;     /* Previous calculation operator. */
  33. extern char progname[] ;        /* Name of this program. */
  34. extern char pstr[] ;            /* Current button text string. */
  35. extern char revtable[] ;        /* Table for reversing the bits in a byte. */
  36. extern char *selection ;        /* Current [Get] selection. */
  37. extern char *shelf ;            /* PUT selection shelf contents. */
  38. extern char snum[] ;            /* Scratch are for scientific numbers. */
  39. extern char ttype_str[3][5] ;   /* Strings for each trig type value. */
  40. extern char validkeys[] ;       /* Valid keys after an error condition. */
  41. extern char validmenu[] ;       /* Valid keys with popup menus. */
  42. extern char x11_display[] ;     /* X11 display information. */
  43.  
  44. extern double convert_display() ;
  45. extern double con_vals[] ;        /* Selectable constants. */
  46. extern double disp_val ;           /* Value of the current display. */
  47. extern double exp_p1[10][4] ;
  48. extern double last_input ;         /* Previous number input by user. */
  49. extern double max_fix[] ;          /* Maximum showable fixed values. */
  50. extern double mem_vals[] ;         /* Memory register values. */
  51. extern double powers[11][4] ;      /* Table of power values for each base. */
  52. extern double result ;             /* Current calculator total value. */
  53. extern double tresults[] ;         /* Current trigonometric results. */
  54.  
  55. extern enum base_type base ;       /* Current base: BIN, OCT, DEC or HEX. */
  56. extern enum gr_type gtype ;        /* What graphics system is being used. */
  57. extern enum num_type dtype ;       /* Number display mode. */
  58. extern enum trig_type ttype ;      /* Trigonometric type (deg, grad or rad). */
  59.  
  60. extern int accuracy ;       /* Number of digits precision (Max 9). */
  61. extern int basevals[] ;     /* Supported arithmetic bases. */
  62. extern int chxoff[] ;       /* X offset for various length button strings. */
  63. extern int color ;          /* Color used for current raster operation. */
  64. extern int column ;         /* Column number of current key/mouse press. */
  65. extern int cur_ch ;         /* Current character if keyboard event. */
  66. extern int curx ;           /* Current mouse X position. */
  67. extern int cury ;           /* Current mouse Y position. */
  68. extern int disp_length[] ;  /* Display length in characters for each base. */
  69. extern int down ;           /* Indicates if mouse button is down. */
  70. extern int error ;          /* Indicates some kind of display error. */
  71. extern int hyperbolic ;     /* If set, trig functions will be hyperbolic. */
  72. extern int iconic ;         /* Set if window is currently iconic. */
  73. extern int inv_video ;      /* Set if user wants inverse video mode. */
  74. extern int inverse ;        /* If set, trig & log functions will be inversed. */
  75. extern int iscolor ;        /* Set if this is a color screen. */
  76. extern int ishelp ;         /* Set if there is a help file. */
  77. extern int issel ;          /* Set if valid [Get] selection. */
  78. extern int ix ;             /* Initial X position of the icon. */
  79. extern int iy ;             /* Initial Y position of the icon. */
  80. extern int key_exp ;        /* Set if entering exponent number. */
  81. extern int new_input ;      /* New number input since last op. */
  82. extern int nextc ;          /* Current event identifier. */
  83. extern int nfont_width ;    /* Width of the normal font characters. */
  84. extern int pending ;        /* Set for command with on multiple presses. */
  85. extern int pending_op ;     /* Arithmetic operation for pending command. */
  86. extern int pointed ;        /* Whether a decimal point has been given. */
  87. extern int portion ;        /* Button portion on current key/mouse press. */
  88. extern int posspec ;        /* Set if -Wp or -g option is present (for X11) */
  89. extern int row ;            /* Row number of current key/mouse press. */
  90. extern int rstate ;         /* Is memory register frame displayed? */
  91. extern int signgam ;
  92. extern int spaces ;         /* Number of spaces in current button string. */
  93. extern int toclear ;        /* Indicates if display should be cleared. */
  94. extern int tstate ;         /* Current button set being displayed. */
  95. extern int wx ;             /* Initial X position of the window. */
  96. extern int wy ;             /* Initial Y position of the window. */
  97. extern int x ;              /* X offset for text for button. */
  98. extern int y ;              /* Y offset for text for button. */
  99.  
  100. extern FILE *hfd ;          /* File descriptor for help information. */
  101.  
  102. extern struct iteminfo items[] ;  /* Panel items. */
  103. extern struct button buttons[] ;  /* Calculator button values. */
  104.